<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>对象的访问与遍历</title>
	</head>
	<body>
		<script>
			var o1={};
			o1.name='Jack';
			o1['age']=18;
			o1.sayHi=function(){
				console.log("Hello JS!");
			}
			
			console.log(o1.age);
			o1.sayHi();
			console.log(o1);
			
			for(var i in o1){
				console.log(i+':'+o1[i]);
			}
			console.log('gender' in o1);
			</script>
	</body>
</html>
